<template>
    <div class="PracticeTest">

        <div v-for="(item,key) in items">
            <!--<van-cell is-link to="/Testdetail">-->
            <van-cell is-link @click="Testdetail($event,item.integral)" :data-integral=item.integral>
                <div class="flex between aCenter">
                    <div>
                        <div class="PracticeTestTitle">{{item.title}}</div>
                        <div class="PracticeTestContent"><span>难度：{{item.nandustar}}</span><span class="quantity">总体{{item.questionnumber}}题</span></div>
                    </div>
                    <div class="integralShow flex jCenter aCenter" v-if=item.isneedintegral>{{item.integral}}积分可兑换</div>
                </div>
            </van-cell>
        </div>



    </div>
</template>
<style scoped>
    .PracticeTest /deep/.van-cell__left-icon, .van-cell__right-icon{
        margin-top: 0.3rem;
    }
    .PracticeTest /deep/.van-cell{
        border-bottom: 1px solid #eeeeee;
    }
    .PracticeTest .PracticeTestTitle{
        font-size: 14px;
        font-weight: bold;
    }
    .PracticeTest .quantity{
        margin-left: 20px;
    }
    .PracticeTest .PracticeTestContent{
        color: #999999;
        font-size: 12px;
    }
    .PracticeTest .integralShow{
        width: 113px;
        height: 23px;
        border-radius: 20px;
        background-color: #ffd530;
        border: 1px solid #edb818;
        color: #dd9e03;
        font-size: 12px;
    }
</style>
<script>
    import { Cell, CellGroup } from 'vant';
    export default {
        data() {
            return {
                items:[],
            }
        },
        components:{
            [Cell.name]:Cell,
            [CellGroup.name]:CellGroup
        },
        methods:{
            Testdetail(e,integral){
                console.log(integral);
                this.$emit("integral",integral)
                this.$emit("show",true)
            }
        }
    }
</script>